package br.com.sysprova.view;

import java.awt.EventQueue;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JPasswordField;

public class TelaCadastroAluno {

	private JFrame frame;
	private JTextField txtMatCadAluno;
	private JTextField txtEmailCadAluno;
	private JTextField txtNomeCadAluno;
	private JPasswordField passwordField;
	private JPasswordField passwordField_1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelaCadastroAluno window = new TelaCadastroAluno();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public TelaCadastroAluno() {
		initialize();
	}
	public Point centralizarFrame (){   
        Rectangle r = frame.getBounds();  
      // Dimensoes da janela  
        int widthSplash = r.width ;  
        int heightSplash = r.height; 
		
		return ( new Point (((int)Toolkit.getDefaultToolkit().getScreenSize().getWidth()/2) - (widthSplash/2),  
	            			((int)Toolkit.getDefaultToolkit().getScreenSize().getHeight()/2) - (heightSplash/2))
			   );  
	} 

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 300);
		frame.setTitle("SysProva");
		frame.setAlwaysOnTop(true);
		frame.setLocation(centralizarFrame());
		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		frame.setVisible(true);
		
		JLabel lblCadAluno = new JLabel("Cadastro de Alunos");
		lblCadAluno.setFont(new Font("SketchFlow Print", Font.BOLD, 18));
		lblCadAluno.setBounds(116, 24, 220, 23);
		frame.getContentPane().add(lblCadAluno);
		
		JLabel lblNomeCadAluno = new JLabel("Nome");
		lblNomeCadAluno.setBounds(28, 77, 46, 14);
		frame.getContentPane().add(lblNomeCadAluno);
		
		JLabel lblEmailCadAluno = new JLabel("E-mail");
		lblEmailCadAluno.setBounds(28, 102, 46, 14);
		frame.getContentPane().add(lblEmailCadAluno);
		
		JLabel lblMatriculaCadAluno = new JLabel("Matr\u00EDcula");
		lblMatriculaCadAluno.setBounds(28, 127, 60, 14);
		frame.getContentPane().add(lblMatriculaCadAluno);
		
		JLabel lblSenhaCadAluno = new JLabel("Senha");
		lblSenhaCadAluno.setBounds(28, 152, 46, 14);
		frame.getContentPane().add(lblSenhaCadAluno);
		
		JLabel lblRepSenhaCadAluno = new JLabel("Repetir Senha");
		lblRepSenhaCadAluno.setBounds(28, 177, 80, 14);
		frame.getContentPane().add(lblRepSenhaCadAluno);
		
		txtMatCadAluno = new JTextField();
		txtMatCadAluno.setBounds(118, 124, 254, 20);
		frame.getContentPane().add(txtMatCadAluno);
		txtMatCadAluno.setColumns(10);
		
		txtEmailCadAluno = new JTextField();
		txtEmailCadAluno.setBounds(118, 99, 254, 20);
		frame.getContentPane().add(txtEmailCadAluno);
		txtEmailCadAluno.setColumns(10);
		
		txtNomeCadAluno = new JTextField();
		txtNomeCadAluno.setBounds(118, 74, 254, 20);
		frame.getContentPane().add(txtNomeCadAluno);
		txtNomeCadAluno.setColumns(10);
		
		JButton btnConfirmarCadAluno = new JButton("Confirmar");
		btnConfirmarCadAluno.setBounds(151, 213, 127, 23);
		frame.getContentPane().add(btnConfirmarCadAluno);
		
		passwordField = new JPasswordField();
		passwordField.setBounds(118, 149, 254, 20);
		frame.getContentPane().add(passwordField);
		
		passwordField_1 = new JPasswordField();
		passwordField_1.setBounds(118, 174, 254, 20);
		frame.getContentPane().add(passwordField_1);
	}
}
